<?php

class ErrorController extends Controller
{
    public function view($ex = null)
    {
        if (!$ex) {
            $ex = new Exception("Lỗi chưa xác định được");
        }
        $appConfig =& $GLOBALS['config']->app;

        $this->assign('message', $ex->getMessage());
        $this->assign('debug_info', print_r($ex, true));
        $this->assign('debug', $appConfig->debug);
    }
}